<?php
/**
 * @author Inhere
 * @version v1.0
 * Use : MCA moduel controller action instance
 * Date : 2015-1-10
 * MCAServiceProvider.php
 */
namespace ulue\base\providers;

use ulue\core\ioc\Container,
    ulue\core\ioc\InterfaceServiceProvider,
    ulue\parts\asset\AssetManager;

class MCAServiceProvider extends AbstractConfigurableServiceProvider
{
    /**
     * 注册一项服务(可能含有多个服务)提供者， MCAServiceProvider
     * @param  Container $container 传入一个容器
     * @return void
     */
    public function register(Container $container)
    {
        $options = $this->options;

        $container->share('asset',function() use ($options)
        {
            return new AssetManager($options);
        })->alias('application.resource')->alias('resource')->alias('app.asset')->alias('application.asset');

        $container->share('asset',function() use ($options)
        {
            return new AssetManager($options);
        })->alias('application.resource')->alias('resource')->alias('app.asset')->alias('application.asset');

        $container->share('asset',function() use ($options)
        {
            return new AssetManager($options);
        })->alias('application.resource')->alias('resource')->alias('app.asset')->alias('application.asset');
    }
}